package com.lab.common;

/**
 * 全局常量类
 * 存储项目中复用的常量值
 */
public class Constants {

    // ====== 角色类型 ======
    public static final String ROLE_STUDENT = "student"; // 学生
    public static final String ROLE_ADMIN = "admin"; // 管理员
    public static final String ROLE_FRONTEND = "frontend"; // 前端开发
    public static final String ROLE_BACKEND = "backend"; // 后端开发
    public static final String ROLE_ALGORITHM = "algorithm"; // 算法开发

    // ====== 请假状态 ======
    public static final String LEAVE_STATUS_PENDING = "pending"; // 待审批
    public static final String LEAVE_STATUS_APPROVED = "approved"; // 已批准
    public static final String LEAVE_STATUS_REJECTED = "rejected"; // 已拒绝

    // ====== 时间格式 ======
    public static final String DATE_FORMAT = "yyyy-MM-dd";
    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String WEEK_IDENTIFIER_FORMAT = "yyyy-'W'ww"; // 周标识格式（如2025-W42）

    // ====== 令牌相关 ======
    public static final String TOKEN_HEADER = "Authorization"; // 请求头中的令牌键
    public static final String TOKEN_PREFIX = "Bearer "; // 令牌前缀
    public static final long TOKEN_EXPIRE = 7 * 24 * 60 * 60 * 1000L; // 令牌有效期（7天）

    // ====== 分页默认值 ======
    public static final int PAGE_SIZE = 10; // 默认每页条数
    public static final int PAGE_NUM = 1; // 默认页码
}